package lab02.test37;

public class StudentDemo {
    public static void main(String[] args) {

        //本科生
        UnderGraduate zhangsan = new UnderGraduate("张三", 89, 79, 69);

        //通过方法求得的平均分赋值给a
        double a = zhangsan.averageGrade(zhangsan.getChinese(), zhangsan.getEnglish(), zhangsan.getMath());

        System.out.println("------------------------------");
        System.out.println(zhangsan.getName() + "三门课程的平均分为：" + a); //a代表平均分
        zhangsan.underGraduate(a);//看是否通过


        //研究生
        Graduate luhan = new Graduate("鹿晗", 89, 89, 79);

        double b = luhan.avgGrade(luhan.getChinese(), luhan.getEnglish(), luhan.getMath());


        System.out.println();
        System.out.println("--------------------------");
        System.out.println(luhan.getName() + "三科的平均分为：" + b);
        luhan.graduate(b);


    }
}